package com.kitchen.api.controller;

import com.kitchen.common.vo.ResultVO;
import com.kitchen.beans.entity.Activity;
import com.kitchen.service.ActivityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author 78468
 * 厨房信息接口
 */
@RequestMapping("/activity")
@CrossOrigin
@RestController
@Api(tags = "厨房活动")
public class ActivityController {

    @Autowired
    private ActivityService activityService;


    @RequestMapping(value = "/kitchenActivity",method = RequestMethod.GET)
    @ApiOperation("显示厨房活动列表")
    public ResultVO kitchenActivityInformationDisplay(){
        return activityService.kitchenActivityInformationDisplay();
    }

    @RequestMapping(value = "/kitchenEventDetails",method = RequestMethod.POST)
    @ApiOperation("显示厨房活动详情的所有商品")
    public ResultVO kitchenEventDetails(@RequestBody Activity activity){
        return activityService.displayOfActiveGoods(activity);
    }
}
